/**
 * @file render.cpp
 * @author ThomasKingFree (dulu150@126.com)
 * @brief
 * @version 0.1
 * @date 2021-03-21
 *
 * @copyright Copyright (c) 2021
 *
 */

#include "render.h"

#include "utils/gui_dfx.h"

namespace YueGUI {
Renderer::Renderer() {}
Renderer::~Renderer() {}

void Renderer::AddDirtyRect(const Rect &dirty) { dirty_.Join(dirty); }

void Renderer::Render(const Rect &dirty) {}

void Renderer::SetContainerWidget(Container &container) {
    container_ = &container;
}

Container &Renderer::GetContainerWidget() { return *container_; }

void Renderer::SetScreenWidth(int16_t width) {
    Dfx::Assert(width > 0);
    width_ = width;
}

int16_t Renderer::GetScreenWidth() const { return width_; }

void Renderer::SetScreenHeight(int16_t height) {
    Dfx::Assert(height > 0);
    height_ = height;
}

int16_t Renderer::GetScreenHeight() const { return height_; }

} // namespace YueGUI
